Lodash中文网 您所在的位置:网站首页 html webpack plugin 依赖lodash Lodash中文网

Lodash中文网

2024-06-25 09:59| 来源: 网络整理| 查看: 265

_.defaults({ 'a': 1 }, { 'a': 3, 'b': 2 });// → { 'a': 1, 'b': 2 }_.partition([1, 2, 3, 4], n => n % 2);// → [[1, 3], [2, 4]]

下载 Core build (~4kB gzipped) Full build (~24kB gzipped) CDN 副本

Lodash 采用 MIT license 协议发布,并且支持最新的运行环境。 检查 构建差异 并选择一个适合您的构建差异。

安装

In a browser:

通过 npm:

$ npm i -g npm$ npm i --save lodash

Node.js:

// Load the full build.var _ = require('lodash');// Load the core build.var _ = require('lodash/core');// Load the FP build for immutable auto-curried iteratee-first data-last methods.var fp = require('lodash/fp'); // Load method categories.var array = require('lodash/array');var object = require('lodash/fp/object'); // Cherry-pick methods for smaller browserify/rollup/webpack bundles.var at = require('lodash/at');var curryN = require('lodash/fp/curryN');

注意:Install n_ for Lodash use in the Node.js < 6 REPL.

为什么选择 Lodash?

Lodash 通过降低 array、number、objects、string 等等的使用难度从而让 JavaScript 变得更简单。 Lodash 的模块化方法 非常适用于:

遍历 array、object 和 string 对值进行操作和检测 创建符合功能的函数 模块格式

Lodash is available in a variety of builds & module formats.

lodash & per method packages lodash-es, babel-plugin-lodash, & lodash-webpack-plugin lodash/fp lodash-amd 补充工具 futil-js is a set of functional utilities designed to complement lodash 扩展阅读 Contributing Release Notes Wiki (Changelog, Roadmap, etc.) 支持

Tested in Chrome 65-66, Firefox 58-59, IE 11, Edge 16, Safari 10-11, Node.js 6-10, & PhantomJS 2.1.1. Automated browser & CI test runs are available.



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有